package springcloud.easybuy.api;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import springcloud.easybuy.entity.EasybuyProduct;

import java.util.List;

@FeignClient(value = "easybuy-database-provider")
@RequestMapping("/product/provider")
public interface EasybuyProductServiceClient {


    @RequestMapping("/queryAllProduct")
    public List<EasybuyProduct> queryAllProduct();


    @RequestMapping("/findProductById/{id}")
    public List<EasybuyProduct> findById(@PathVariable("id") int id);

    @RequestMapping("/findById/{id}")
    public EasybuyProduct findByMainId(@PathVariable("id") int id);

}
